//
//  WillCollectionViewCell.m
//  MyMovie
//
//  Created by Weiwei on 16/3/4.
//  Copyright © 2016年 bever贝沃汇力 weiwei. All rights reserved.
//

#import "WillCollectionViewCell.h"

@implementation WillCollectionViewCell

- (void)awakeFromNib {
    // Initialization code
}



//@property(nonatomic,copy)NSString*releaseDate,*title,*director,*actor1,*actor2,*type,*image;
//
//@property(nonatomic,strong)NSNumber*wantedCount;
-(void)setModel:(AttentionModel *)model{
    _model = model;
    
    self.showDate.text = _model.releaseDate;
    self.title.text = _model.title;
    self.director.text = _model.director;
    self.actor.text = [NSString stringWithFormat:@"%@ %@",_model.actor1,_model.actor2];
    self.type.text = _model.type;
    [self.image setImageWithURL:[NSURL URLWithString:_model.image]];
    
    
    //富文本拼接
    //0.取出人数
    NSString* wanted = [NSString stringWithFormat:@"%ld",[_model.wantedCount integerValue]];
    //1.拼接出常用的字符串
    NSString* string = [NSString stringWithFormat:@"%@人期待上映",wanted];
    
    //2.转换成富文本
    NSMutableAttributedString* maString = [[NSMutableAttributedString alloc]initWithString:string];
    [maString addAttribute:NSForegroundColorAttributeName value:[UIColor orangeColor] range:NSMakeRange(0, wanted.length)];
    
    self.wanted.attributedText = maString;
    
    
    
    
    
    
}


@end
